package com.core.reach.cloudhub.handler;

import com.core.reach.cloudhub.domain.CommonResult;
import com.core.reach.cloudhub.domain.Payment;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: TODO
 * @date 2020/3/31 14:41
 **/
public class CustomerFallbackHandler {

    public static CommonResult<Payment> fallbackHandler(@PathVariable Long id, Throwable e) {
        Payment payment = new Payment(0L, null);
        return new CommonResult<>(444, "id:" + id + ";兜底异常fallback handler，exception内容：" + e.getMessage(), payment);
    }

}
